fix(release): reject mislabeled binary artifacts before install - #1156
Open
ArjunDeshwal wants to merge 1 commit into
Open
fix(release): reject mislabeled binary artifacts before install#1156ArjunDeshwal wants to merge 1 commit into
ArjunDeshwal wants to merge 1 commit into
Conversation
ArjunDeshwal
marked this pull request as ready for review
August 30, 2026 23:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
{ product, version, target }identity in every compiled CLI.Why
Issues #932, #1082, and #1143 report official platform archives launching unrelated bundled scripts instead of Freebuff. The public build script names a fixed entrypoint, while the launcher previously trusted any executable found under the expected archive filename.
This adds an end-to-end invariant at the consumer boundary: an artifact labeled
freebuff-<target>is installable only when the executable identifies itself as the requested Freebuff version and target. A bad update cannot replace a working cached binary.This is deliberately a defense against release/artifact mix-ups; it does not claim a root cause inside the private release service.
Validation
bun test cli/src/__tests__/build-identity.test.ts cli/src/__tests__/release/artifact-identity.test.ts cli/src/__tests__/release/wrapper-safety.test.ts— 31 passbun run build:sdk && bun freebuff/cli/build.ts 0.0.0-cibun cli/scripts/smoke-binary.ts cli/bin/freebuff— tree-sitter initialized and the login prompt was detected during the 10-second boot smokenode --check cli/release-core/launcher.jsbunx prettier --checkon all changed source, test, and workflow filesScope
No backend, production probing, release-host mutation, or checksum/security claim. The contract detects accidental or stale artifact substitution; it is not intended as a cryptographic authenticity mechanism.
Rollout note: publish every target archive built with this identity contract before, or atomically with, the launcher version that enforces it. An older archive without
--print-build-infowill be rejected and a working cached binary will be retained.Addresses the failure class reported in #932, #1082, and #1143.